
#ifndef __IDT
#define __IDT


struct __idt_entry {

  unsigned short offset_lo;
  unsigned short selector;
  unsigned char  zero;
  unsigned char  flags;
  unsigned short offset_hi;

} __attribute__ ((packed));

struct __idt_descriptor {

  unsigned short lim;
  unsigned int base;

} __attribute__ ((packed));

void __make_idt_entry(unsigned char, unsigned int, unsigned short, unsigned char);
void __set_default_idt();
void __load_idt();
void __isr_handle(int, int);

#endif
